package com.itrus.spring.aop.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;

/**
 * @author peigen
 * @since 2024/10/8
 */
@Slf4j
@Service
public class OrderService {

    @Resource
    private UserService userService;

    public String createOrder() {
        String userId = userService.getUserId();
        // 模拟检查登录等逻辑
        if (!StringUtils.hasText(userId)) {
            return null;
        }
        return "success";
    }
}
